package NGUYENHOANG.OOP.BT1;

public class MODELS {
	public double PTBac2(int a, int b, int c){
		double q = 0;
		double delta;
		delta = (b*b)-(4*a)*c;
		
		if(delta == 0){
			q = (-b)/2*a;
		}
		else if( delta > 0){
			q = (((-b)- Math.sqrt(delta))/2*a);
			q = (((-b)+ Math.sqrt(delta))/2*a);
		}
		else if(delta < 0){
		System.out.println("Pt vo nghiem");
		}
		return q;
	}
}
